<!DOCTYPE html>
<html  xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>healthcheck</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
    <center style="padding-top: 4%">
        <div >
            <span style="font-size: large;padding-bottom: 2%" th:text="${platformName}"></span>
            <span style="font-size: large;padding-bottom: 2%">各服务器运行状态</span>
        </div>
        <div align="right" style="width: 50%;padding-bottom: 1%"><button id="refresh">刷新</button></div>
        <table id="generatedTable" align="center" border="1" cellpadding="0" cellspacing="0" width="50%" >
            <thead>
                <tr height="40">
                    <th>服务器名称</th>
                    <th>IP地址</th>
                    <th>服务端口</th>
                    <th>运行状态</th>
                </tr>
            </thead>
            <tbody th:if="${not #lists.isEmpty(list)}" >
                <tr id="cloneTr" th:each="customResponse:${list}" align="center" height="40">
                    <td th:text="${customResponse.serverName}"></td>
                    <td th:text="${customResponse.serviceHost}"></td>
                    <td th:text="${customResponse.port}"></td>
                    <td th:if="${customResponse.result}==true"  style="background-color: #008000"><span>正常</span></td>
                    <td th:if="${customResponse.result}==false"  style="background-color: #ff0000"><span>异常</span></td>
                </tr>
            </tbody>
        </table>
    </center>

</body>
<script type="text/javascript">
$("#refresh").click(function(){
    location.reload();
});
setInterval('location.reload()',5*60*1000);
</script>
</html>